﻿using System;
using System.Collections.Generic;

using E.BLL;
using E.Model;
using E.Web.UI.Page;

using X.Common;

namespace E.Web
{
    public partial class FeedbackFrame : BasePage
    {
        protected override void ShowPage()
        {
            if (ispost)
            {
                string userName = XRequest.GetString("UserNameTxt");
                string title = XRequest.GetString("TitleTxt");
                string content = XRequest.GetString("ContentTxt");

                if (!userName.Equals("") && !title.Equals("") && !content.Equals(""))
                {
                    FeedBackModel model = new FeedBackModel();
                    model.UserName = userName;
                    model.Title = title;
                    model.Content = content;
                    model.IP = XRequest.GetIP();
                    model.AddDate = DateTime.Now;

                    (new FeedBackBLL()).AddFeedBack(model);

                    ExecuteJS("alert('感谢您的参与'); window.top.location.reload();");
                }
                else
                {
                    ExecuteJS("alert('请填写完整信息');");
                }
            }
        }

        protected void Page_Load(object sender, EventArgs e)
        {

        }
    }
}
